import VueRouter from 'vue-router'
import homecontainer from './components/tabbar/HomeContainer.vue'
import membercontainer from './components/tabbar/MemberContainer.vue'
import shopcontainer from './components/tabbar/ShopContainer.vue'
import searchcontainer from './components/tabbar/SearchContainer.vue'
import newslist from './components/news/newslist.vue'
import newsinfo from './components/news/newsinfo.vue'
import photoslist from './components/photos/photoslist.vue'
import photosinfo from './components/photos/photosinfo.vue'

// 3. 创建路由对象
var router = new VueRouter({
  routes: [
   {path: '*',redirect: '/home'},//除了已经配置好路由
   {path:'/home', component: homecontainer},
   {path:'/member', component: membercontainer},
   {path:'/shopcar', component: shopcontainer},
   {path:'/search', component: searchcontainer},
   {path:'/home/newslist',component:newslist},
   {path:'/home/newsinfo:id',component:newsinfo},
   {path:'/home/photoslist',component:photoslist},
   {path:'/home/photosinfo:id',component:photosinfo}
  ], linkActiveClass : 'mui-active'
})

// 把路由对象暴露出去
export default router